package cn.dlc.com.rmi.main;

import java.rmi.Naming;

import cn.dlc.com.rmi.server.UserService;

public class ClientMain {

	public static void main(String[] args) throws Exception{
		// 拿到这个远程调用对象
		UserService userService = (UserService)Naming.lookup("rmi://localhost:8888/UserService");
		// 直接调用方法
		String sayHello = userService.sayHello("muyu");
		System.out.println(sayHello);
	}
}
